<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/jquery-3.3.1.min.js"></script>
    <script>
        $(function(){
            /**
             * 将DOM对象转换为jquery对象
             */
            var divDom = document.getElementById('hello') // DOM对象
            console.log(divDom.innerText)

            var divJquery = $(divDom) // jquery对象
            console.log(divJquery.text())
            divJquery.css('background', 'pink')

            /**
             * 将jquery对象转换为DOM对象
             */
            var pJquery = $('#world') // jquery对象
            var pDom = pJquery[0] // DOM对象

        })
    </script>
</head>
<body>
    <div id="hello">哈哈</div>

    <p id="world">嘻嘻</p>
</body>
</html>